<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="<?php echo __PUBLIC__?>/Admin/Flat/img/favicon.ico">


	    <script src="<?php echo __PUBLIC__?>/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/Home/js/hdjs.css"/>
		<script src="<?php echo __PUBLIC__?>/Home/js/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<form action="" method="post"  onsubmit="return hd_submit(this,'<?php echo U('Category/edit')?>','<?php echo U('Category/index')?>')">
		<div class="alert alert-success">编辑 <?php echo $cateData['cname']?> 分类</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类名称" required="" name="cname" value="<?php echo $cateData['cname']?>">
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属类型</label>
			<select name="type_tid" class="form-control">
				<?php foreach ($typeData as $k=>$v){?>
				<option value="<?php echo $v['tid']?>" <?php if($v['tid']==$cateData['type_tid']){?>
                 selected="selected" 
               <?php }?>><?php echo $v['tname']?></option>
				<?php }?>
			</select>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属分类</label>
			<select name="pid" class="form-control">
			<?php if(isset($getData)){?>
                
				<?php foreach ($getData as $k=>$v){?>
					<option value="<?php echo $v['cid']?>" <?php if($v['cid']==$cateData['pid']){?>
                 selected="selected" 
               <?php }?>><?php echo $v['_name']?></option>
				<?php }?>
			<?php }else{?>
				<option value="0">顶级分类</option>
			
               <?php }?>
			</select>
		</div>
		<div id="">
				<label for="">是否热门</label>
				<br />
				<label class="checkbox checkbox-inline">
					<input id="checkbox1" class="custom-checkbox" type="checkbox" value="1" name="is_hot"  data-toggle="checkbox" <?php if($cateData['is_hot']==1){?>
                 checked="checked" 
               <?php }?>>
					<span class="icons">
					<span class="icon-unchecked"></span>
					<span class="icon-checked"></span>
					</span>
					热门
				</label>

			</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类排序" required="" name="sort" value="<?php echo $cateData['sort']?>">
		</div>
		
		<input type="hidden" name="cid" value="<?php echo $cateData['cid']?>">
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
